<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
  $(document).ready(function(){
    $("#labContent").treeTable();
  });
</script>
<table  id="labContent" class="table table-bordered mg-t datatable">
  <thead>
  <tr>
    <th>开单科室</th>
    <th>开单时间</th>
    <th>送检科室</th>
  </tr>
  </thead>
  <tbody>
  <c:forEach items="${labApplies}" var="lab" varStatus="ss">
    <tr id="${ss.count}" pid="${lab.id}">
      <td>${lab.billingDept}</td>
      <td><fmt:formatDate value="${lab.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
      <td>${lab.implementDept}</td>
    </tr>
    <c:if test="${lab.examItemList.size()>0}">
      <tr id="${ss.count}" pid="${lab.id}">
        <td colspan="6">
          <table class="table table-bordered mg-t">
            <tr>
              <th>序号</th>
              <th>项目名称</th>
              <th>项目编码</th>
              <th>费用</th>
            </tr>
            <c:forEach items="${lab.labItemList}" var="item" varStatus="ss">
              <tr>
                <td> ${ss.count}</td>
                <td> ${item.itemName}</td>
                <td> ${item.itemCode}</td>
                <td> ${item.costs}</td>
              </tr>
            </c:forEach>
          </table>
        </td>
      </tr>
    </c:if>
  </c:forEach>
  </tbody>
</table>